import api from "../request.js";


// 个人互助信息概要
export function personInfo(params) {
  return api.get("/mutualAid/my/resume", params);
}
// 我的互助列表
export function myHelpList(params) {
  return api.get("/mutualAid/my/family", params);
}
// 我的资产列表
export function myPropertyList(params) {
  return api.get("/mutualAid/my/capital/list", params);
}
// 资产详情-电站详情
export function myPropertyDetail(params) {
  return api.get("/mutualAid/capital/detail", params);
}
// 资产详情-发电详情
export function electricityDetail(params) {
  return api.get("/mutualAid/capital/power/chart", params);
}
// 资产详情-收益保障
export function earningsDetail(params) {
  return api.get("/mutualAid/capital/income/chart", params);
}
// 保障详情
export function safeguardDetail(params) {
  return api.get("/mutualAid/order/detail/"+params.id);
}
//放弃保障
export function waiveSalf(params) {
  return api.post("/mutualAid/giveup",params,'提交中...');
}
// 变更保障人
export function changeSafePerson(params) {
  return api.post("/mutualAid/change",params,'提交中...');
}
// 互助计划已加入的人员列表
export function listByPlan(params) {
  return api.get("/mutualAid/beneficiary/listByPlan/"+params.id);
}
// 退出保障时守护帮助统计
export function returnStatistics(params) {
  return api.get("/mutualAid/help/count/"+params.id);
}
//获取最近一个激活和最近一个未激活的人员
export function getNoActiveInfo(params) {
  return api.get("/mutualAid/beneficiary/recentlyPersons/"+params.id);
}
// 绑定银行卡发起申请
export function confirmCardSign(params) {
  return api.post("/eleSign/individual/bankCard4Factors/apply",params);
}
// 绑定银行卡确认申请
export function confirmBank(params) {
  return api.post(`/eleSign/individual/bankCard4Factors/verify?verifyCode=${params.verifyCode}&flowId=${params.flowId}`);
}
// 解绑银行卡
export function UntyingBank(params) {
  return api.deletes(`/pay/bankCard/unBind/${params}`);
}
// 银行卡列表
export function bankList() {
  return api.get(`/pay/bankCard/list`);
}
// 红包余额
export function redEnvelope() {
  return api.get(`/uesrCenter/redEnvelope/balance`);
}
// 红包提现
export function redEnvelopeCash(params) {
  return api.post(`/uesrCenter/redEnvelope/cashOut?amount=${params}`);
}
// 红包明细
export function redEnvelopeDetailed(params) {
  return api.post(`/uesrCenter/redEnvelope/page?pageNo=${params.pageNo}&pageSize=${params.pageSize}`);
}

